php:
  version: 5.4.39-1.w6

  packages:
    cli: true
    common: true
    devel: true
    bcmath: true
    fpm: true
    gd: true
    ldap: true
    mbstring: true
    mcrypt: true
    mssql: true
    mysqlnd: true
    pdo: true
    pspell: true
    process: true # This is php-posix, php-sysvmsg, php-sysvsem, php-sysvshm
    soap: true
    tidy: true
    xml: true # This is CentOS equivalent of php-dom

  pecl_packages:
    apcu: true
    imagick: true
    zendopcache: true
    memcache: true
    memcached: true
    {% if 'live' not in salt['grains.get']('app', {}) %}
    #Use Xdebug only in non-live environment
    xdebug: true
    {% endif %}

  pecl_install:
    uuid: true
    stem: true


  {% if 'local' not in salt['grains.get']('app', {}) %}
  # DEV/STAGE/etc (Actual Server) config
  config:
    ini:
      # Disable display error in LIVE
      {% if 'live' in salt['grains.get']('app', {}) %}
      display_errors: "Off"
      {% endif %}

      opcache:
        memory_consumption: 128M
        interned_strings_buffer: 8
        validate_timestamps: 0

    fpm:
      pm.max_children: 200
      pm.start_servers: 30
      pm.min_spare_servers: 20
      pm.max_spare_servers: 40
      pm.max_requests: 300

  {% else %}
  # LOCALDEV /  Vagrant config
  config:
    ini:
      opcache:
        memory_consumption: 64M
        interned_strings_buffer: 8
        validate_timestamps: 1

    fpm:
      pm.max_children: 10
      pm.start_servers: 2
      pm.min_spare_servers: 2
      pm.max_spare_servers: 2
      pm.max_requests: 200
  {% endif %}
